package com.itheima.多态.多态的好处_06;


//测试类
public class Demo {
    public static void main(String[] args) {
        //父类引用指向子类对象
        AnimalOperator operator = new AnimalOperator();
        operator.useAnimal(new Pig());
        operator.useAnimal(new Dog());
        operator.useAnimal(new Monkey());
    }
}
